/* 自定义样式 */
body {
  padding-top: 20px;
  background-color: #f8f9fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.scrollarea {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-container {
  padding: 15px;
}

h1 {
  color: #333;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
  font-size: 1.5rem;
}

.form-label {
  font-weight: 500;
  color: #555;
  font-size: 0.9rem;
}

.form-control {
  border-radius: 4px;
  border: 1px solid #ddd;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.table {
  margin-top: 15px;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th, .table td {
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.table thead {
  background-color: #f2f2f2;
  color: #333;
}

.table-header {
  background-color: #f8f9fa;
  font-weight: bold;
}

.clickable-cell {
  cursor: pointer;
  text-decoration: underline;
  color: #0d6efd;
}

.clickable-cell:hover {
  color: #0a58ca;
}

.difference-positive {
  color: red;
  font-weight: 500;
}

.difference-negative {
  color: blue;
  font-weight: 500;
}

.difference-zero {
  color: green;
  font-weight: 500;
}

.action-btn-group {
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
}

.btn {
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.btn-primary:hover {
  background-color: #0a58ca;
  border-color: #0a58ca;
}

.btn-success {
  background-color: #198754;
  border-color: #198754;
}

.btn-success:hover {
  background-color: #157347;
  border-color: #157347;
}

.btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-danger:hover {
  background-color: #bb2d3b;
  border-color: #bb2d3b;
}

.modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.modal-title {
  font-weight: 600;
  color: #333;
}

.modal-body {
  padding: 15px;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 10px 15px;
}

.table-hover tbody tr:hover {
  background-color: #f5f5f5;
}

/* 动画效果 */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

input[type="number"] {
  width: 70px;
  text-align: center;
  padding: 5px 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }
  
  .table-container {
    padding: 10px;
  }
  
  h1 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }
  
  .table th, .table td {
    padding: 8px 5px;
    font-size: 0.8rem;
    max-width: 80px;
  }
  
  .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .scrollarea {
    max-height: calc(100vh - 180px);
  }
  
  /* 移动端表格优化 */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* 模态框优化 */
  .modal-dialog {
    margin: 0.5rem;
    max-width: 100%;
  }
  
  .modal-body {
    padding: 10px;
  }
  
  .form-label {
    font-size: 0.8rem;
  }
  
  .form-control {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  
  input[type="number"] {
    width: 60px;
  }
}    